chcp 65001

::::::::::::::::::::::::::::::::::::::::
:: @Author XianMin(1032694760@qq.com)
::::::::::::::::::::::::::::::::::::::::
:: You need to download maven or maven-call mvnd and set the JAVA_HOME, MVN_HOME/MVND_HOME and PATH environment variables
:: Intel(R) Celeron(R) N5095A@2.00GHz The 2.00 GHz computer uses the `call mvnd` to build for about 10 minutes (`mvn` spent 16 minutes)

@echo off
color 0A

set SOURCE_PATH=%PATH%
:: set PATH=C:\SoftwareOK\maven-call mvnd-1.0.2-windows-amd64\bin;C:\SoftwareOK\maven-call mvnd-1.0.2-windows-amd64\mvn\bin;%SOURCE_PATH%
set PATH=%JAVA_HOME%\bin;%MVND_HOME%\bin;%MVND_HOME%\mvn\bin;%SOURCE_PATH%

if not "%1"=="" goto :eof

echo.
echo ----------------------------------------------------------------
	echo.  [1] Build local enviroment package
	echo.  [2] Build local enviroment package (Not clean)
	echo.  [3] Build dev enviroment package
	echo.  [4] Build dev enviroment package (Not clean)
	echo.  [5] Build prod enviroment package (Blue Deployment)
	echo.  [6] Build prod enviroment package (Not clean)
	echo.  [7] Build test enviroment package (Green Deployment)
	echo.  [8] Build test enviroment package (Not clean)
	echo.  [9] Build bootstrap executable package
echo ----------------------------------------------------------------
echo.

echo.Please input the serial number of the selected operation (1-5):
set /p id=
	if "%id%"=="1" goto :local
	if "%id%"=="2" goto :local2
	if "%id%"=="3" goto :dev
	if "%id%"=="4" goto :dev2
	if "%id%"=="5" goto :prod
	if "%id%"=="6" goto :prod2
	if "%id%"=="7" goto :test
	if "%id%"=="8" goto :test2
	if "%id%"=="9" goto :exec
	if "%id%"=="" goto :eof
pause

:local
call mvnd --activate-profiles local clean package
goto :end

:local2
call mvnd --offline --activate-profiles local package
goto :end

:dev
call mvnd --activate-profiles dev clean package
goto :end

:dev2
call mvnd --offline --activate-profiles dev package
goto :end

:prod
call mvnd --activate-profiles prod clean package
goto :end

:prod2
call mvnd --offline --activate-profiles prod package
goto :end

:test
call mvnd --activate-profiles test clean package
goto :end

:test2
call mvnd --offline --activate-profiles test package
goto :end

:exec
call mvnd --projects com.gitee.li_yu_jiang:xianmin-bootstrap clean package
goto :end

:end
pause
